#include <stdio.h>


//void printf(char *p[3])
//void printf(char *p[])
//打印一个指针数组a[3]的成员
int  print(int n, char **p)
{
    int i;
    for(i = 0; i < n; i++)
    {
        printf("%s\n", p[i]);
        //printf("%p\n", *p[i]);
       // printf("%p\n", **p[i]);
    }
    return 0;
}


int main01()
{
    char *a[3];//指针数组
    char a1[] = "hello";
    char a2[] = "abc";
    char a3[] = "world";
    a[0] = a1;// a[0] = &a1; a[0]= a1[0];数组的地址就是数组的名字，也是数组的首个成员
    a[1] = a2;
    a[2] = a3;

    print(sizeof(a) / sizeof(a[0]), a);
    printf("-----------\n");
    printf("%s\n", a[0]);
    printf("%p\n", a[0]);
    printf("%c\n", *a[1]);
    return 0;
}


//args是一个指针数组char *
//argc代表这个数组有多少成员
int main(int argc, char **args)
{
    int i;
    for(i = 0; i < argc; i++)
    {
        printf("%s\n", args[i]);
    }
    return 0;

}
